package com.neusoft.neuiotms.dcom.repository;

import java.util.List;

import org.springframework.data.jpa.repository.JpaRepository;

import com.neusoft.neuiotms.dcom.model.QuestionnaireFeedback;

public interface QuestionnaireFeedbackRepository
        extends JpaRepository<QuestionnaireFeedback, Long>, CustomizedQuestionnaireFeedbackRepository {

    List<QuestionnaireFeedback> findByUsername(String username);

    List<QuestionnaireFeedback> findByUsernameIn(List<String> usernames);

    QuestionnaireFeedback findByUsernameAndQuestionnaire_Id(String username, long questionnaireId);

    long countByUsernameAndQuestionnaire_IdAndSubmitted(String username, long questionnaireId, boolean submitted);
}
